package cn.shrek.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ConfigurationProperties(prefix = "shiro")
public class ShiroProperties {
    public String getLoginUrl() {
        return loginUrl;
    }

    public void setLoginUrl(String loginUrl) {
        this.loginUrl = loginUrl;
    }

    public String getUnauthorizedUrl() {
        return unauthorizedUrl;
    }

    public void setUnauthorizedUrl(String unauthorizedUrl) {
        this.unauthorizedUrl = unauthorizedUrl;
    }

    public String getLogOutUrl() {
        return logOutUrl;
    }

    public void setLogOutUrl(String logOutUrl) {
        this.logOutUrl = logOutUrl;
    }

    public String[] getAnonUrl() {
        return anonUrl;
    }

    public void setAnonUrl(String[] anonUrl) {
        this.anonUrl = anonUrl;
    }

    public String[] getAuthcUrl() {
        return authcUrl;
    }

    public void setAuthcUrl(String[] authcUrl) {
        this.authcUrl = authcUrl;
    }

    //散列次数
    private Integer hashIterations=2;
    //加密方式
    private String hashAlgorithmName="MD5";
    //登录
    private String loginUrl;
    //未授权证
    private String unauthorizedUrl;
    //登出
    private String logOutUrl;
    //放行的请求
    private String[] anonUrl;
    //需要认证的请求
    private String[] authcUrl;

    public Integer getHashIterations() {
        return hashIterations;
    }

    public void setHashIterations(Integer hashIterations) {
        this.hashIterations = hashIterations;
    }

    public String getHashAlgorithmName() {
        return hashAlgorithmName;
    }

    public void setHashAlgorithmName(String hashAlgorithmName) {
        this.hashAlgorithmName = hashAlgorithmName;
    }
}
